from django.db import models

# Create your models here.
#
# class Category(models.Model):
#     name = models.CharField(max_length=100)
#
# class Article(models.Model):
#     title = models.CharField(max_length=100)
#     content = models.TextField()
#     category = models.ForeignKey("Category",on_delete=models.CASCADE,null=True)
#     # author = models.ForeignKey("frontuser.FrontUser",on_delete=models.CASCADE,null=True)
#
#
# class Tag(models.Model):
#     name = models.CharField(max_length=100)
#     articles = models.ManyToManyField("Article")

class Article(models.Model):
    title = models.CharField(max_length=100)
    content = models.TextField()
    price = models.FloatField(default=0)
    create_time = models.DateTimeField(auto_now_add=True)

    class Meta:
        db_table = 'article'